package com.appkubes.mall.restful.application.user.account.history.service;

import com.appkubes.base.core.entity.vo.UserKeyVO;
import com.appkubes.mall.core.common.constants.MallUserAccountHistoryConstants;
import com.appkubes.mall.core.entity.MallUserAccountHistory;
import com.appkubes.mall.core.service.BaseMallUserAccountHistoryService;
import com.appkubes.mall.restful.application.user.account.account.entity.dto.AccountHistoryDTO;
import com.appkubes.mall.restful.application.user.account.account.entity.dto.AccountStatisDTO;
import com.appkubes.mall.restful.application.user.account.account.entity.dto.OrderPayUserAccountDTO;

import java.util.List;

/**
 * @Author: Rongjie
 * @Date: 2020/1/13 21:56
 * @Description:
 */
public interface UserAccountHistoryService extends BaseMallUserAccountHistoryService {


    //获取当前的统计
    AccountStatisDTO getTodayStatis(UserKeyVO userKeyVO);

    List<AccountHistoryDTO> geHistory(String userKey, MallUserAccountHistoryConstants.State state);

    Boolean onOrderPay(OrderPayUserAccountDTO orderPayUserAccountDTO);


    /**
     * 获取账户记录信息, 已经根据三入参，设置了唯一性索引
     *
     * @param sourceType
     * @param sourceKey
     * @return
     */
    MallUserAccountHistory getAccountHistory(String sourceType, String sourceKey);

    /**
     * 减少参数，获取用户指定的账户订单佣金收入情况
     *
     * @param orderKey
     * @return
     */
    MallUserAccountHistory getAccountOrderHistory(String orderKey);
}
